You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sanitized filenames before processing in the upload route.
Fixed file validation failures for filenames containing version numbers in parentheses (e.g., airport city (1).xml).
Updated upload validation logic to correctly handle versioned filenames during New Stack migrations.
Why?
In the New Stack v1.0.2 flow, file uploads were failing validation when the filename contained a version suffix in parentheses. This prevented valid migration files from being processed successfully. The filename sanitization ensures such files are handled correctly during validation and upload.
🧩 Affected Areas
api — Node.js backend
ui — React frontend
upload-api — Upload API server
docker / docker-compose
CI / GitHub Actions workflows
Environment variables / config
Other:
🧪 How to Test
Navigate to the New Stack migration flow.
Upload a migration file with a versioned filename, such as airport city (1).xml.
Verify that the file passes validation and uploads successfully.
Upload a file without a version suffix and verify existing behavior remains unchanged.
Expected result:
Files with version suffixes in their names should pass validation and upload successfully.
Existing file upload behavior should remain unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Jira Ticket
(https://contentstack.atlassian.net/browse/CMG-1015)
📋 PR Type
📝 Description
What changed?
Sanitized filenames before processing in the upload route.
Fixed file validation failures for filenames containing version numbers in parentheses (e.g., airport city (1).xml).
Updated upload validation logic to correctly handle versioned filenames during New Stack migrations.
Why?
In the New Stack v1.0.2 flow, file uploads were failing validation when the filename contained a version suffix in parentheses. This prevented valid migration files from being processed successfully. The filename sanitization ensures such files are handled correctly during validation and upload.
🧩 Affected Areas
api— Node.js backendui— React frontendupload-api— Upload API serverdocker/docker-compose🧪 How to Test
Expected result:
✅ Author Checklist
feature/,bugfix/, orhotfix/+ 5–30 lowercase chars.env/example.envupdated if new environment variables were addednpm test)README.md/ docs updated if behaviour changed👀 Reviewer Notes